<template>
	<div id="contract_device_container" />
</template>

<script setup lang="ts">
	import {nextTick, onMounted} from 'vue'
	import {microApps} from '@/micros/apps'

	const props = defineProps<{
		contractId: string
		contractStatus: number
	}>()

	onMounted(() => {
		microApps.removeApp('device').then(() => {
			microApps.loadApp({
				name: 'device',
				props: {
					path: '/contract-devices',
					query: {
						contractId: props.contractId,
						contractStatus: props.contractStatus
					}
				},
				container: '#contract_device_container'
			})
		})
	})
</script>

<style lang="less">
	#contract_device_container {
		height: 100%;
	}
</style>
